#ifndef CUBE_GAMESTATE_H_
#define CUBE_GAMESTATE_H_

enum eGameMode
{
	GM_UNKNOWN = 0,
	GM_LOGO,
	GM_TITLE,
	GM_TUTORIAL,
	GM_PLAY,
	GM_PAUSE,
	GM_GAMEOVER,
};

class GameState
{
public :
	explicit			GameState( eGameMode currentState ) : _currentState( currentState ), _isInitialized( false ){}
	virtual				~GameState(){}

	eGameMode			GetCurrentState(){ return _currentState; }

	bool				IsInitialized(){ return _isInitialized; }

	virtual LRESULT		MessageHandler( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) = 0;
	virtual void		ChangeState( GameState** currentState, eGameMode nextState ) = 0;
	virtual bool		Initialize( void* info = NULL ) = 0;	
	virtual void		Release() = 0;
	virtual void		Run( GameState** currentState, float time ) = 0;

protected :
	void				Initialized(){ _isInitialized = true; }

private :
	const eGameMode		_currentState;
	bool				_isInitialized;
};

#endif